package com.itheima.TCP.TCP发送协议;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class ClientDemo1 {
    public static void main(String[] args) throws IOException {
        //创建一个Socket对象
        Socket socket = new Socket("92.168.18.22", 10000);
        //获取一个IO流开始写数据
        OutputStream os = socket.getOutputStream();
        os.write("     1   ".getBytes());
        //关流
        //os.close();
        socket.close();
    }
}
